-- GENERATED SPELL FOR [Stonevault Oracle] --


function spell0_4852(pUnit, Event) --@Healing Ward,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(5605,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_4852', 1, 1)
end

function spell1_4852(pUnit, Event) --@Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(8005,pUnit)
pUnit:RegisterEvent('Sorts_4852', 3000, 1)
end

function spell2_4852(pUnit, Event) --@Lava Spout Totem,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(8264,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_4852', 1, 1)
end

function spell3_4852(pUnit, Event) --@Lightning Shield,Self--
pUnit:FullCastSpellOnTarget(945,pUnit)
pUnit:RegisterEvent('Sorts_4852', 578, 1)
end

function Sorts_4852(pUnit, Event)
local choix_sorts_4852 = math.random(0, 3)
if choix_sorts_4852 == 0 then
pUnit:RegisterEvent('spell0_4852', 1, 1)
end
if choix_sorts_4852 == 1 then
pUnit:RegisterEvent('spell1_4852', 1, 1)
end
if choix_sorts_4852 == 2 then
pUnit:RegisterEvent('spell2_4852', 1, 1)
end
if choix_sorts_4852 == 3 then
pUnit:RegisterEvent('spell3_4852', 1, 1)
end
end

function mob4852_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4852', math.random(1500, 3000), 1)
end

function mob4852_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4852_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4852_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4852, 1, 'mob4852_Action')
RegisterUnitEvent(4852, 2, 'mob4852_Leave')
RegisterUnitEvent(4852, 3, 'mob4852_Kill')
RegisterUnitEvent(4852, 4, 'mob4852_Die')
